 $("#getCaptcha").click(function(){
	var mobile = $("input[name='mobile']").val();
	var obj = $(this);
	obj.attr('disabled',true);
	obj.attr('class','gtbtnOk');
	$.ajax({
		url:'topic.php',
		data:{act:'get_captcha',topic_id:topic_id,mobile:mobile,sign:sign,unique:unique},
		type:'post',
		cache:false,
		dataType:'json',
		success:function(jsonObj){
			if(jsonObj.code == 0){
				obj.attr('disabled',true);
				obj.attr('class','gtbtnOk');
				Timer();
			}else{
				alert(jsonObj.message);
				obj.attr('disabled',false);
				obj.attr('class','gtbtn');
			}
		},
		error:function(){
			obj.attr('disabled',false);
			alert('异常');
		}
	});	
 });

function doUpdate(a) {
		a == wait / 1E3 ? ($("#getCaptcha").attr("class","gtbtn"),$("#getCaptcha").attr("disabled",false),$("#getCaptcha").val("获取短信验证码")): (wut = wait / 1E3 - a, $("#getCaptcha").val(wut + "/S"));
}
function Timer() {
    secs = 120;
    wait = 1E3 * secs;
    for (i = 1; i <= wait / 1E3; i++) window.setTimeout("doUpdate(" + i + ")", 1E3 * i)
}